Navigation

interface Navigation : Advisable<P> , Observable<T>

Allows loading resources in the browser instance and working with the navigation history.

Properties

Link copied to clipboard
Link copied to clipboard

Indicates whether the previous location in the back-forward list can be loaded.

Link copied to clipboard

Indicates whether the next location in the back-forward list can be loaded.

Link copied to clipboard

Returns the current entry of the back-forward list.

Link copied to clipboard

Returns the index of the current item in the back-forward list or -1 if the list is empty.

Link copied to clipboard

Returns the number of items in the back-forward list.

Functions

Link copied to clipboard
abstract fun browser(): Browser
Returns the Browser instance of this navigation.
Link copied to clipboard
inline fun <C : Callback> Advisable<in C>.callback(): C?
inline fun <C : Callback> Advisable<in C>.callback(): C?

Returns the currently registered callback of type C, if any.

Link copied to clipboard
abstract fun canGoBack(): Boolean
Indicates whether the previous location can be loaded.
Link copied to clipboard
abstract fun canGoForward(): Boolean
Indicates whether the next location can be loaded.
Link copied to clipboard
abstract fun currentEntryIndex(): Int
Returns the index of the current item in the back-forward list or -1 if the list is empty.
Link copied to clipboard
Returns the default navigation timeout in seconds.
Link copied to clipboard
abstract fun entryAtIndex(index: Int): NavigationEntry
Returns an Optional that contains the NavigationEntry instance for the given index in the back-forward list, otherwise an empty Optional.
Link copied to clipboard
abstract fun entryCount(): Int
Returns the number of items in the back-forward list.
Link copied to clipboard
abstract fun <C : P?> get(callbackClass: Class<C>): Optional<C>
Returns an Optional that contains the callback of the given type or an empty Optional if there is no registered callback with the given type.
Link copied to clipboard
abstract fun goBack()
Loads the previous location in the back-forward list.
Link copied to clipboard
abstract fun goForward()
Loads the next location in the back-forward list.
Link copied to clipboard
abstract fun goToIndex(index: Int)
Navigates to a specific location at the given index from the back-forward list.
Link copied to clipboard
abstract fun isLoading(): Boolean
Returns true if any of the browser frames is in the process of loading a document.
Link copied to clipboard
abstract fun loadUrl(params: LoadUrlParams)
Navigates to the resource identified by the given params.
abstract fun loadUrl(url: String)
Navigates to the resource identified by the given url.
Link copied to clipboard
abstract fun loadUrlAndWait(params: LoadUrlParams)
Loads the resource identified by the given params and blocks the current thread execution until the main frame of the resource is loaded completely or the defaultTimeout is reached.
abstract fun loadUrlAndWait(url: String)
Loads the resource identified by the given url and blocks the current thread execution until the main frame of the resource is loaded completely or the defaultTimeout is reached.
abstract fun loadUrlAndWait(params: LoadUrlParams, timeout: Duration)
Loads a resource identified by the given params and blocks the current thread execution until the main frame of the resource is loaded completely or the given timeout is reached.
abstract fun loadUrlAndWait(url: String, timeout: Duration)
Loads the resource identified by the given url and blocks the current thread execution until the main frame of the resource is loaded completely or the given timeout is reached.
Link copied to clipboard
abstract fun <E : T?> on(eventClass: Class<E>, observer: Observer<E>): Subscription
Subscribes the given event observer to receive the events of the given eventClass.
Link copied to clipboard
inline fun <C : Callback> Advisable<in C>.register(callback: C): C?
inline fun <C : Callback> Advisable<in C>.register(callback: C): C?

Registers the given callback in this Advisable.

Link copied to clipboard
abstract fun reload()
Reloads the currently loaded web page.
Link copied to clipboard
Reloads the currently loaded web page, but if the current web page has POST data, the user is prompted to see if they really want to reload the page.
Link copied to clipboard
abstract fun reloadIgnoringCache()
Reloads the currently loaded web page ignoring caches.
Link copied to clipboard
Reloads the currently loaded web page ignoring caches, but if the current web page has POST data, the user is prompted to see if they really want to reload the page.
Link copied to clipboard
abstract fun <C : P?> remove(callbackClass: Class<C>): C
Removes a particular service callback.
Link copied to clipboard
inline fun <C : Callback> Advisable<in C>.removeCallback(): C?
inline fun <C : Callback> Advisable<in C>.removeCallback(): C?

Removes a callback of type C from this Advisable, if any.

Link copied to clipboard
abstract fun removeEntryAtIndex(index: Int): Boolean
Removes the item at the given index in the back-forward list and returns true if it was removed successfully.
Link copied to clipboard
abstract fun <C : P?> set(callbackClass: Class<C>, callback: C): C
Sets a particular service callback.
Link copied to clipboard
abstract fun stop()
Cancels any pending navigation or download operation and stops any dynamic page elements, such as background sounds and animations.
Link copied to clipboard
inline fun <E : Event> Observable<in E>.subscribe(observer: Observer<E>): Subscription
inline fun <E : Event> Observable<in E>.subscribe(observer: Observer<E>): Subscription

Subscribes the given observer to receive events of type E from this Observable.